import request from '@/config/axios'

export interface TenantConfigVO {
  id: number
  waybillSrc: number
  driverAuthNeed: boolean
  vehicleAuthNeed: boolean
  queueFeeSet: number
  waybillFlowConfig: string
}

// 查询当前企业基础配置
export const getCurrentUserConfig1 = async () => {
  return await request.get({ url: `/queue/corp-config/getCorpConfig` })
}

// 查询当前企业基础配置
export const getCurrentUserConfig = async () => {
  return await request.get({ url: `/queue/corp-config/get-corp-config` })
}
// 查询租户配置管理列表
export const getTenantConfigPage = async (params: TenantConfigVO) => {
  return await request.get({ url: `/queue/tenant-config/page`, params })
}

// 查询租户配置管理详情
export const getTenantConfig = async (id: number) => {
  return await request.get({ url: `/queue/tenant-config/get?id=` + id })
}

// 新增租户配置管理
export const createTenantConfig = async (data: TenantConfigVO) => {
  return await request.post({ url: `/queue/tenant-config/create`, data })
}

// 修改租户配置管理
export const updateTenantConfig = async (data: TenantConfigVO) => {
  return await request.put({ url: `/queue/tenant-config/update`, data })
}

// 删除租户配置管理
export const deleteTenantConfig = async (id: number) => {
  return await request.delete({ url: `/queue/tenant-config/delete?id=` + id })
}

// 导出租户配置管理 Excel
export const exportTenantConfig = async (params) => {
  return await request.download({ url: `/queue/tenant-config/export-excel`, params })
}
